Page({
  data: {
    current: 1,
    pageSize: 10,
    list: []
  },
  goDetail(e) {
    // console.log(e);
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + e.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  onLoad() {
    this.getRepHouse()
  },
  async getRepHouse() {
    const { current, pageSize } = this.data
    const res = await wx.http({
      url: "/repair",
      data: {
        current,
        pageSize
      }
    })
    console.log(res);
    this.setData({ list: res.data.rows })
  }
})
